<template>
    <div id="rent" style="height: 250px;width: 100%;"></div>
</template>
  
<script>
import * as echarts from 'echarts';
export default {
    data() {
        return {
        }
    },
    mounted() {
        this.initChart()
    },
    methods: {
        initChart() {
            var chartDom = document.getElementById('rent');
            var myChart = echarts.init(chartDom);
            var option;

            option = {
                title: {
                    text: 'T_7订单统计',
                    // subtext: '订单统计',
                    left: 'center'
                },
                tooltip: {
                    trigger: 'item'
                },
                legend: {
                    orient: 'horizontal',
                    y: 'bottom',
                    x: 'center'
                },
                series: [
                    {
                        name: 'T_7订单统计',
                        type: 'pie',
                        radius: '50%',
                        data: [
                            { value: 1048, name: '其他订单' },
                            { value: 735, name: '今日被分配订单' },
                        ],
                        emphasis: {
                            itemStyle: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            option && myChart.setOption(option);
        }
    }
}
</script>
  
<style lang="scss" scoped>

</style>
  